package edu.qhst.team.manager.feign;

import edu.qhst.common.resp.BaseResponse;
import edu.qhst.user.dto.UserSafeInfoDto;
import edu.qhst.user.feign.UserFeign;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 微服务调用 Feign 客户端管理
 *
 * @author 加浓美式
 * @date 2023/6/25
 */
@Component
@AllArgsConstructor
@NoArgsConstructor
public class UserFeignManager {

    private UserFeign userFeign;

    public UserSafeInfoDto getUserById(Long userId) {
        return userFeign.getUserById(userId);
    }

    public boolean getUserRole(UserSafeInfoDto loginUser) {
        return userFeign.getUserRole(loginUser);
    }
}
